Wide and narrow (sometimes un-stacked and stacked) are terms used to describe two different presentations for tabular data.[1][2][3]
Contents |
Wide, or unstacked data is presented with each different data variable in a separate column.
Person | Age | Weight |
---|---|---|
Bob | 32 | 128 |
Alice | 24 | 86 |
Steve | 64 | 95 |
Narrow, or stacked data is presented with one column containing all the values and another column listing the context of the value
Person | Variable | Value |
---|---|---|
Bob | Age | 32 |
Bob | Weight | 128 |
Alice | Age | 24 |
Alice | Weight | 86 |
Steve | Age | 64 |
Steve | Weight | 95 |
This is often easier to implement, addition of a new field does not require any changes to the structure of the table, however it can be harder for people to understand.
Many statistical and data processing systems have functions to convert between these two presentations, for instance the R programming language has several packages such as melt.
|